//
// CCloud.java
// Copyright (C) 2010  "Naush" <naush _ hotmail _ fr>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>./* ----------------------------------------------------------------------------







package org.ryzom.nel.threed;

import org.ryzom.nel.misc.CRGBA;
import org.ryzom.nel.misc.CVector;

public class CCloud {
  private long swigCPtr;
  protected boolean swigCMemOwn;

  public CCloud(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  public static long getCPtr(CCloud obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        nel3dJNI.delete_CCloud(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public CCloud(CCloudScape pCloudScape) {
    this(nel3dJNI.new_CCloud(CCloudScape.getCPtr(pCloudScape), pCloudScape), true);
  }

  public void init(long nVoxelW, long nVoxelH, long nVoxelD, float rBaseFreq, long nNbOctave) {
    nel3dJNI.CCloud_init(swigCPtr, this, nVoxelW, nVoxelH, nVoxelD, rBaseFreq, nNbOctave);
  }

  public void generate(CNoise3d noise) {
    nel3dJNI.CCloud_generate(swigCPtr, this, CNoise3d.getCPtr(noise), noise);
  }

  public void light() {
    nel3dJNI.CCloud_light(swigCPtr, this);
  }

  public void reset(CCamera pViewer) {
    nel3dJNI.CCloud_reset(swigCPtr, this, CCamera.getCPtr(pViewer), pViewer);
  }

  public void anim(double dt, double dt2) {
    nel3dJNI.CCloud_anim(swigCPtr, this, dt, dt2);
  }

  public void disp() {
    nel3dJNI.CCloud_disp(swigCPtr, this);
  }

  public void dispXYZ(CMaterial pMat) {
    nel3dJNI.CCloud_dispXYZ__SWIG_0(swigCPtr, this, CMaterial.getCPtr(pMat), pMat);
  }

  public void dispXYZ() {
    nel3dJNI.CCloud_dispXYZ__SWIG_1(swigCPtr, this);
  }

  public void genBill(CCamera pViewer, long nBillSize) {
    nel3dJNI.CCloud_genBill__SWIG_0(swigCPtr, this, CCamera.getCPtr(pViewer), pViewer, nBillSize);
  }

  public void genBill(CCamera pViewer) {
    nel3dJNI.CCloud_genBill__SWIG_1(swigCPtr, this, CCamera.getCPtr(pViewer), pViewer);
  }

  public void dispBill(CCamera pViewer) {
    nel3dJNI.CCloud_dispBill(swigCPtr, this, CCamera.getCPtr(pViewer), pViewer);
  }

  public float getX() {
    return nel3dJNI.CCloud_getX(swigCPtr, this);
  }

  public float getLastX() {
    return nel3dJNI.CCloud_getLastX(swigCPtr, this);
  }

  public float getY() {
    return nel3dJNI.CCloud_getY(swigCPtr, this);
  }

  public float getZ() {
    return nel3dJNI.CCloud_getZ(swigCPtr, this);
  }

  public float getSizeX() {
    return nel3dJNI.CCloud_getSizeX(swigCPtr, this);
  }

  public float getSizeY() {
    return nel3dJNI.CCloud_getSizeY(swigCPtr, this);
  }

  public float getSizeZ() {
    return nel3dJNI.CCloud_getSizeZ(swigCPtr, this);
  }

  public void setX(float x) {
    nel3dJNI.CCloud_setX(swigCPtr, this, x);
  }

  public void setY(float y) {
    nel3dJNI.CCloud_setY(swigCPtr, this, y);
  }

  public void setZ(float z) {
    nel3dJNI.CCloud_setZ(swigCPtr, this, z);
  }

  public void setSizeX(float x) {
    nel3dJNI.CCloud_setSizeX(swigCPtr, this, x);
  }

  public void setSizeY(float y) {
    nel3dJNI.CCloud_setSizeY(swigCPtr, this, y);
  }

  public void setSizeZ(float z) {
    nel3dJNI.CCloud_setSizeZ(swigCPtr, this, z);
  }

  public void setTexClamp(SCloudTextureClamp t) {
    nel3dJNI.CCloud_setTexClamp(swigCPtr, this, SCloudTextureClamp.getCPtr(t), t);
  }

  public void setTex3DTemp(SCloudTexture3D t) {
    nel3dJNI.CCloud_setTex3DTemp(swigCPtr, this, SCloudTexture3D.getCPtr(t), t);
  }

  public void setLooping() {
    nel3dJNI.CCloud_setLooping(swigCPtr, this);
  }

  public long getBillSize() {
    return nel3dJNI.CCloud_getBillSize(swigCPtr, this);
  }

  public long getMemSize() {
    return nel3dJNI.CCloud_getMemSize(swigCPtr, this);
  }

  public void setTime(double value) {
    nel3dJNI.CCloud_Time_set(swigCPtr, this, value);
  }

  public double getTime() {
    return nel3dJNI.CCloud_Time_get(swigCPtr, this);
  }

  public void setFuturTime(double value) {
    nel3dJNI.CCloud_FuturTime_set(swigCPtr, this, value);
  }

  public double getFuturTime() {
    return nel3dJNI.CCloud_FuturTime_get(swigCPtr, this);
  }

  public void setCloudDiffuse(CRGBA value) {
    nel3dJNI.CCloud_CloudDiffuse_set(swigCPtr, this, CRGBA.getCPtr(value), value);
  }

  public CRGBA getCloudDiffuse() {
    long cPtr = nel3dJNI.CCloud_CloudDiffuse_get(swigCPtr, this);
    return (cPtr == 0) ? null : new CRGBA(cPtr, false);
  }

  public void setCloudAmbient(CRGBA value) {
    nel3dJNI.CCloud_CloudAmbient_set(swigCPtr, this, CRGBA.getCPtr(value), value);
  }

  public CRGBA getCloudAmbient() {
    long cPtr = nel3dJNI.CCloud_CloudAmbient_get(swigCPtr, this);
    return (cPtr == 0) ? null : new CRGBA(cPtr, false);
  }

  public void setCloudPower(short value) {
    nel3dJNI.CCloud_CloudPower_set(swigCPtr, this, value);
  }

  public short getCloudPower() {
    return nel3dJNI.CCloud_CloudPower_get(swigCPtr, this);
  }

  public void setCloudDistAtt(short value) {
    nel3dJNI.CCloud_CloudDistAtt_set(swigCPtr, this, value);
  }

  public short getCloudDistAtt() {
    return nel3dJNI.CCloud_CloudDistAtt_get(swigCPtr, this);
  }

  public void setLastCloudPower(short value) {
    nel3dJNI.CCloud_LastCloudPower_set(swigCPtr, this, value);
  }

  public short getLastCloudPower() {
    return nel3dJNI.CCloud_LastCloudPower_get(swigCPtr, this);
  }

  public void set_BillSize(long value) {
    nel3dJNI.CCloud__BillSize_set(swigCPtr, this, value);
  }

  public long get_BillSize() {
    return nel3dJNI.CCloud__BillSize_get(swigCPtr, this);
  }

  public void set_MemBill(SWIGTYPE_p_unsigned_char value) {
    nel3dJNI.CCloud__MemBill_set(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(value));
  }

  public SWIGTYPE_p_unsigned_char get_MemBill() {
    long cPtr = nel3dJNI.CCloud__MemBill_get(swigCPtr, this);
    return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
  }

  public void set_TexBill(SWIGTYPE_p_NLMISC__CSmartPtrT_NL3D__CTextureMem_t value) {
    nel3dJNI.CCloud__TexBill_set(swigCPtr, this, SWIGTYPE_p_NLMISC__CSmartPtrT_NL3D__CTextureMem_t.getCPtr(value));
  }

  public SWIGTYPE_p_NLMISC__CSmartPtrT_NL3D__CTextureMem_t get_TexBill() {
    long cPtr = nel3dJNI.CCloud__TexBill_get(swigCPtr, this);
    return (cPtr == 0) ? null : new SWIGTYPE_p_NLMISC__CSmartPtrT_NL3D__CTextureMem_t(cPtr, false);
  }

  public void set_OldBillSize(long value) {
    nel3dJNI.CCloud__OldBillSize_set(swigCPtr, this, value);
  }

  public long get_OldBillSize() {
    return nel3dJNI.CCloud__OldBillSize_get(swigCPtr, this);
  }

  public void set_MemOldBill(SWIGTYPE_p_unsigned_char value) {
    nel3dJNI.CCloud__MemOldBill_set(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(value));
  }

  public SWIGTYPE_p_unsigned_char get_MemOldBill() {
    long cPtr = nel3dJNI.CCloud__MemOldBill_get(swigCPtr, this);
    return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
  }

  public void set_TexOldBill(SWIGTYPE_p_NLMISC__CSmartPtrT_NL3D__CTextureMem_t value) {
    nel3dJNI.CCloud__TexOldBill_set(swigCPtr, this, SWIGTYPE_p_NLMISC__CSmartPtrT_NL3D__CTextureMem_t.getCPtr(value));
  }

  public SWIGTYPE_p_NLMISC__CSmartPtrT_NL3D__CTextureMem_t get_TexOldBill() {
    long cPtr = nel3dJNI.CCloud__TexOldBill_get(swigCPtr, this);
    return (cPtr == 0) ? null : new SWIGTYPE_p_NLMISC__CSmartPtrT_NL3D__CTextureMem_t(cPtr, false);
  }

  public void set_WaitState(short value) {
    nel3dJNI.CCloud__WaitState_set(swigCPtr, this, value);
  }

  public short get_WaitState() {
    return nel3dJNI.CCloud__WaitState_get(swigCPtr, this);
  }

  public void set_BillViewer(CVector value) {
    nel3dJNI.CCloud__BillViewer_set(swigCPtr, this, CVector.getCPtr(value), value);
  }

  public CVector get_BillViewer() {
    long cPtr = nel3dJNI.CCloud__BillViewer_get(swigCPtr, this);
    return (cPtr == 0) ? null : new CVector(cPtr, false);
  }

  public void set_BillCenter(CVector value) {
    nel3dJNI.CCloud__BillCenter_set(swigCPtr, this, CVector.getCPtr(value), value);
  }

  public CVector get_BillCenter() {
    long cPtr = nel3dJNI.CCloud__BillCenter_get(swigCPtr, this);
    return (cPtr == 0) ? null : new CVector(cPtr, false);
  }

  public void set_BillOldCenter(CVector value) {
    nel3dJNI.CCloud__BillOldCenter_set(swigCPtr, this, CVector.getCPtr(value), value);
  }

  public CVector get_BillOldCenter() {
    long cPtr = nel3dJNI.CCloud__BillOldCenter_get(swigCPtr, this);
    return (cPtr == 0) ? null : new CVector(cPtr, false);
  }

}
